// 模型注册页面样式 - 深色主题
.container {
  min-height: 100vh;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
  
  // 覆盖全局深色主题
  :global(.ant-typography) {
    color: #ffffff !important;
  }

  // 图片上传组件样式
  .imageUploader {
    :global(.ant-upload) {
      width: 120px !important;
      height: 120px !important;
      background-color: #2a2a2a !important;
      border: 2px dashed #444 !important;
      border-radius: 8px !important;
      
      &:hover {
        border-color: #00ff00 !important;
      }
    }
    
    :global(.ant-upload-select) {
      color: #e0e0e0 !important;
      
      &:hover {
        color: #00ff00 !important;
      }
    }
  }

  :global(.ant-upload-list-picture-card) {
    .ant-upload-list-item {
      background-color: #2a2a2a !important;
      border-color: #444 !important;
    }
  }
  
  :global(.ant-card) {
    background: #1a1a1a !important;
    color: #ffffff !important;
    border-color: #333 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
  }
  
  :global(.ant-card-head) {
    color: #ffffff !important;
    border-bottom-color: #333 !important;
  }
  
  :global(.ant-card-head-title) {
    color: #ffffff !important;
  }
  
  :global(.ant-btn) {
    &.ant-btn-default {
      background-color: #2a2a2a !important;
      border-color: #444 !important;
      color: #e0e0e0 !important;
      
      &:hover {
        background-color: #333 !important;
        border-color: #555 !important;
        color: #ffffff !important;
      }
    }
    
    &.ant-btn-primary {
      background-color: #00ff00 !important;
      border-color: #00ff00 !important;
      color: #000000 !important;
      
      &:hover {
        background-color: #00cc00 !important;
        border-color: #00cc00 !important;
      }
    }
    
    &.ant-btn-text {
      color: #e0e0e0 !important;
      
      &:hover {
        color: #00ff00 !important;
        background-color: rgba(0, 255, 0, 0.1) !important;
      }
      
      &.ant-btn-dangerous {
        color: #ff4d4f !important;
        
        &:hover {
          color: #ff7875 !important;
          background-color: rgba(255, 77, 79, 0.1) !important;
        }
      }
    }
    
    &.ant-btn-dangerous {
      background-color: #ff4444 !important;
      border-color: #ff4444 !important;
      color: #ffffff !important;
      
      &:hover {
        background-color: #ff6666 !important;
        border-color: #ff6666 !important;
      }
    }
  }
  
  :global(.ant-input) {
    background-color: #2a2a2a !important;
    border-color: #444 !important;
    color: #e0e0e0 !important;
    
    &:hover {
      border-color: #555 !important;
    }
    
    &:focus {
      border-color: #00ff00 !important;
      box-shadow: 0 0 0 2px rgba(0, 255, 0, 0.2) !important;
    }
  }
  
  :global(.ant-input-number) {
    background-color: #2a2a2a !important;
    border-color: #444 !important;
    color: #e0e0e0 !important;
    
    .ant-input-number-input {
      background-color: transparent !important;
      color: #e0e0e0 !important;
    }
    
    &:hover {
      border-color: #555 !important;
    }
    
    &:focus-within {
      border-color: #00ff00 !important;
      box-shadow: 0 0 0 2px rgba(0, 255, 0, 0.2) !important;
    }
  }
  
  :global(.ant-select) {
    .ant-select-selector {
      background-color: #2a2a2a !important;
      border-color: #444 !important;
      color: #e0e0e0 !important;
    }
    
    &:hover .ant-select-selector {
      border-color: #555 !important;
    }
    
    &.ant-select-focused .ant-select-selector {
      border-color: #00ff00 !important;
      box-shadow: 0 0 0 2px rgba(0, 255, 0, 0.2) !important;
    }
  }
  
  :global(.ant-select-dropdown) {
    background-color: #2a2a2a !important;
    border-color: #444 !important;
    
    .ant-select-item {
      color: #e0e0e0 !important;
      
      &:hover {
        background-color: #333 !important;
      }
      
      &.ant-select-item-option-selected {
        background-color: #00ff00 !important;
        color: #000000 !important;
      }
    }
  }
  
  :global(.ant-table) {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
    
    .ant-table-thead > tr > th {
      background-color: #2a2a2a !important;
      color: #ffffff !important;
      border-bottom-color: #444 !important;
    }
    
    .ant-table-tbody > tr > td {
      border-bottom-color: #333 !important;
      color: #e0e0e0 !important;
    }
    
    .ant-table-tbody > tr:hover > td {
      background-color: #2a2a2a !important;
    }
    
    .ant-table-row-selected > td {
      background-color: rgba(0, 255, 0, 0.1) !important;
    }
  }
  
  :global(.ant-pagination) {
    .ant-pagination-item {
      background-color: #2a2a2a !important;
      border-color: #444 !important;
      
      a {
        color: #e0e0e0 !important;
      }
      
      &:hover {
        border-color: #00ff00 !important;
        
        a {
          color: #00ff00 !important;
        }
      }
      
      &.ant-pagination-item-active {
        background-color: #00ff00 !important;
        border-color: #00ff00 !important;
        
        a {
          color: #000000 !important;
        }
      }
    }
    
    .ant-pagination-prev,
    .ant-pagination-next {
      background-color: #2a2a2a !important;
      border-color: #444 !important;
      color: #e0e0e0 !important;
      
      &:hover {
        border-color: #00ff00 !important;
        color: #00ff00 !important;
      }
    }
  }
  
  :global(.ant-tag) {
    background: transparent !important;
    border: 1px solid #444 !important;
    color: #e0e0e0 !important;
     
     &.ant-tag-blue {
      background: rgba(24, 144, 255, 0.2) !important;
      border-color: #1890ff !important;
      color: #69c0ff !important;
    }
    
    &.ant-tag-green {
      background: rgba(82, 196, 26, 0.2) !important;
      border-color: #52c41a !important;
      color: #95de64 !important;
    }
    
    &.ant-tag-orange {
      background: rgba(250, 173, 20, 0.2) !important;
      border-color: #faad14 !important;
      color: #ffc53d !important;
    }
  }
  
  :global(.ant-modal) {
    .ant-modal-content {
      background-color: #1a1a1a !important;
      color: #e0e0e0 !important;
    }
    
    .ant-modal-header {
      background-color: #1a1a1a !important;
      border-bottom-color: #333 !important;
      
      .ant-modal-title {
        color: #ffffff !important;
      }
    }
    
    .ant-modal-close {
      color: #e0e0e0 !important;
      
      &:hover {
        color: #ffffff !important;
      }
    }
  }
  
  :global(.ant-form-item-label) {
    label {
      color: #e0e0e0 !important;
    }
  }
  
  :global(.ant-tabs) {
    .ant-tabs-nav {
      &::before {
        border-bottom-color: #333 !important;
      }
    }
    
    .ant-tabs-tab {
      color: #e0e0e0 !important;
      
      &:hover {
        color: #00ff00 !important;
      }
      
      &.ant-tabs-tab-active {
        color: #00ff00 !important;
        
        .ant-tabs-tab-btn {
          color: #00ff00 !important;
        }
      }
    }
    
    .ant-tabs-ink-bar {
      background-color: #00ff00 !important;
    }
  }
  
  :global(.ant-divider) {
    border-color: #333 !important;
  }
  
  :global(.ant-badge) {
    .ant-badge-count {
      background-color: #00ff00 !important;
      color: #000000 !important;
    }
  }
}

// 页面头部
.header {
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #333;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  
  .headerContent {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
  }
  
  .headerLeft {
    display: flex;
    align-items: center;
    gap: 16px;
  }
  
  .title {
    margin: 0 !important;
    color: #ffffff !important;
    font-size: 24px;
    font-weight: 600;
  }
  
  .headerRight {
    display: flex;
    align-items: center;
    gap: 12px;
  }
}

// 主要内容区域
.content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  
  .mainCard {
    border-radius: 12px;
    overflow: hidden;
  }
}

// 过滤区域
.filterSection {
  margin-bottom: 16px;
  padding: 16px;
  background: rgba(42, 42, 42, 0.5);
  border-radius: 8px;
  border: 1px solid #333;
}

// 模态框样式
.modal {
  .modalFooter {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
  }
}

// 模板详情样式
.templateDetail {
  .ant-typography {
    color: #e0e0e0 !important;
    
    &.ant-typography-title {
      color: #ffffff !important;
    }
  }
  
  code {
    background-color: #2a2a2a !important;
    color: #00ff00 !important;
    border: 1px solid #444 !important;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
  }
}

// 响应式设计
@media (max-width: 768px) {
  .header {
    .headerContent {
      padding: 0 16px;
      height: 64px;
    }
    
    .title {
      font-size: 20px !important;
    }
  }
  
  .content {
    padding: 16px;
  }
  
  .filterSection {
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .header {
    .headerContent {
      flex-direction: column;
      height: auto;
      padding: 12px 16px;
      gap: 12px;
    }
    
    .headerLeft,
    .headerRight {
      width: 100%;
      justify-content: center;
    }
  }
  
  .content {
    padding: 12px;
  }
}

// 动画效果
.container {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

// 加载状态
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  color: #e0e0e0;
}

// 空状态
.empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  color: #666;
  
  .emptyIcon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
  }
  
  .emptyText {
    font-size: 16px;
    margin-bottom: 16px;
  }
}

// 状态指示器
.statusIndicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  
  &.success {
    background: rgba(0, 255, 0, 0.1);
    color: #00ff00;
    border: 1px solid rgba(0, 255, 0, 0.3);
  }
  
  &.error {
    background: rgba(255, 68, 68, 0.1);
    color: #ff4444;
    border: 1px solid rgba(255, 68, 68, 0.3);
  }
  
  &.warning {
    background: rgba(255, 170, 0, 0.1);
    color: #ffaa00;
    border: 1px solid rgba(255, 170, 0, 0.3);
  }
}

// 工具提示样式
:global(.ant-tooltip) {
  .ant-tooltip-inner {
    background-color: #2a2a2a !important;
    color: #e0e0e0 !important;
    border: 1px solid #444 !important;
  }
  
  .ant-tooltip-arrow {
    &::before {
      background-color: #2a2a2a !important;
      border-color: #444 !important;
    }
  }
}

// 确认弹窗样式
:global(.ant-popconfirm) {
  .ant-popover-inner {
    background-color: #2a2a2a !important;
    color: #e0e0e0 !important;
    border: 1px solid #444 !important;
  }
  
  .ant-popover-arrow {
    &::before {
      background-color: #2a2a2a !important;
      border-color: #444 !important;
    }
  }
  
  .ant-popover-message {
    color: #e0e0e0 !important;
  }
}

// 消息提示样式
:global(.ant-message) {
  .ant-message-notice {
    .ant-message-notice-content {
      background-color: #2a2a2a !important;
      color: #e0e0e0 !important;
      border: 1px solid #444 !important;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    }
  }
  
  .ant-message-success {
    .anticon {
      color: #00ff00 !important;
    }
  }
  
  .ant-message-error {
    .anticon {
      color: #ff4444 !important;
    }
  }
  
  .ant-message-warning {
    .anticon {
      color: #ffaa00 !important;
    }
  }
}